<?php
/**
 *
 *
 */
class Yz_Property_Checkbox
    extends Yz_Property_Scalar
{


    /** Test if a value is a valid true/false
     *  @param mixed value
     *  @return bool
     *  @throw TypeError
     */
    public function testValue($value)
    {
        $value = parent::testValue($value);
        if (null === $value)
            return false;
        $value = Yz_String::isTrue($value);
        if (null === $value)
            throw TypeError::_new_();
        return $value;
    }

}
